package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Footprint;
import com.cskaoyan.bean.wx.WxFootprintFinalVO;
import com.cskaoyan.bean.wx.WxFootprintVO;
import com.cskaoyan.service.wx.WxFootprintService;
import org.apache.ibatis.type.MappedTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Map;

@RestController
@RequestMapping("wx/footprint/")
public class WxFootprintController {

    @Autowired
    WxFootprintService wxFootprintService;

    @RequestMapping("list")
    public BaseRespVo wxFootprintList(Integer page, Integer size){
        WxFootprintFinalVO wxFootprintFinalVO = wxFootprintService.queryWxFootprintList(page, size);
        return BaseRespVo.ok(wxFootprintFinalVO);
    }

    @RequestMapping("delete")
    public BaseRespVo wxFootprintDelete(@RequestBody Map<String, Integer> map) {
        Integer id = map.get("id");
        wxFootprintService.deleteWxFootprint(id);
        return BaseRespVo.ok();
    }

}
